Be consistent and use the same wifi signal strength thresholds that are
used by Settings to ensure that the signal strengths look the same in
Settings and gnome-shell.
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/master/panels/netwo>
for the values used in Control Center.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/217
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1432>
const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface);
function signalToIcon(value) {
- if (value > 80)
- return 'excellent';
- if (value > 55)
- return 'good';
- if (value > 30)
- return 'ok';
- if (value > 5)
+ if (value < 20)
+ return 'none';
+ else if (value < 40)
return 'weak';
- return 'none';
+ else if (value < 50)
+ return 'ok';
+ else if (value < 80)
+ return 'good';
+ else
+ return 'excellent';
}
function ssidToLabel(ssid) {